interface ExtraData {
  ip:string
  device:string
  device_type?:string
  browser?:string
  browser_version?:string
  os?:string
  os_version?:string
}



export interface Comment {
  id: string
  content: string
  extradata: ExtraData
  userAgent: string
  created_at: string
  username: string
}

export interface CommentFormData {
  content: string
  author: string
}

export interface PaginationParams {
  pageIndex: number
  pageSize: number
}

export interface PaginationResponse {
  pageIndex: number
  pageSize: number
  total: number
  totalPages: number
}

// 替换 T = any 为更具体的类型
export interface ApiResponse<T = unknown> {
  success?: boolean;
  error?: string;
  message?: string;
  data?: T;
  comments?: Comment[];
  comment?: Comment;
  pageIndex?: number;
  pageSize?: number;
  total?: number;
  totalPages?: number;
}